

chrome.storage.sync.get(['wenku'], function(result) {
    console.log('wenku.js: Value currently is ' + result.wenku);
    if (result.wenku) wenkuSimple();
});

function insertCss(css) {
    var el = document.createElement('link');
    el.setAttribute('rel', 'stylesheet');
    el.setAttribute('href', chrome.extension.getURL(css));
    return el;
}

function wenkuSimple() {
    if (!document.URL.includes("wenku.baidu.com/")) {
        return;
    }

    insertCss("wenku.css")
}